package com.zoe.app.mapper;

import com.zoe.app.eneity.RedPackage;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author zoe.Zhang
 * @date 2023/02/03
 * @description
 */
public interface RedPageMapper {
    @Select("select * from red_packge")
    List<RedPackage> selectAll();

    @Select("select * from red_packge where id = 1")
    RedPackage getOne();

    @Update("update red_packge set amount = #{amount},count= #{count} where id = 1")
    int updateRed(RedPackage redPackage);
}
